import axios from "../index.js";
// 响应命令单

// 响应命令单  编辑 列表
export const xymldSubmissionList = (data) => {
  return axios.request({
    url: "/emergency/emergencyResponse/listPage",
    method: "post",
    data: data
  });
};
// 响应命令单  编辑 删除
export const deletelist = (data) => {
  return axios.request({
    url: "/emergency/emergencyResponse/deleteById",
    method: "post",
    data: data
  });
};
// 响应命令单  编辑 修改
export const editlist = (data) => {
  return axios.request({
    url: "/emergency/emergencyResponse/updById",
    method: "post",
    data: data
  });
};
// 响应命令单  编辑 详情
export const getinfo = (data) => {
  return axios.request({
    url: "/emergency/emergencyResponse/getById",
    method: "get",
    data: data
  });
};
// 响应命令单  保存
export const xymldFeedbackSave = (data) => {
  return axios.request({
    url: "/emergency/emergencyResponse/save",
    method: "post",
    data: data
  });
};
// 响应命令单  提交
export const xymldFeedbacksubmit = (data) => {
  return axios.request({
    url: "/emergency/emergencyResponse/submit",
    method: "post",
    data: data
  });
};
// 响应命令单  保存
export const xymldFeedbackapprove = (data) => {
  return axios.request({
    url: "/emergency/emergencyResponse/approve",
    method: "post",
    data: data
  });
};
// 响应研判单下拉接口
export const getjudgelist = (data) => {
  return axios.request({
    url: "/emergency/emergencyResponse/notCreateOrder",
    method: "post",
    data: data
  });
};
// 获取研判单数据
export const getjudgeinfo = (data) => {
  return axios.request({
    url: "/emergency/emergencyResponse/getJudgeData",
    method: "get",
    data: data
  });
};

// 获取已发布响应命令单
export const getpublishedinfo = (data) => {
  return axios.request({
    url: "/emergency/emergencyResponse/selectResponse",
    method: "get",
    data: data
  });
};

// 获取组织机构 部门 dept  单位unit 抄报cb  抄送cs
export const getOrgApi = (data) => {
  return axios.request({
    url: "/emergency/organization/getOrganizationList",
    method: "get",
    data: data
  });
};

// 获取人员
export const getMemberApi = (data) => {
  return axios.request({
    url: "/emergency/organization/getTestUserList",
    method: "get",
    data: data
  });
};
// 新增 获取联系人
export const getPersonApi = (data) => {
  return axios.request({
    // url: "/brac/orgAccount/getAccountOrgInfoList",
    url: "/system/account/getAccountOrgInfoList",
    method: "get",
    data: data
  });
};

// 获取命令单详情操作流程
export const getOperateFlowApi = (data) => {
  return axios.request({
    url: "/emergency/emergencyResponse/getOperationLog",
    method: "get",
    data: data
  });
};

// 获取左侧流程
export const getLeftFlowApi = (data) => {
  return axios.request({
    url: "/emergency/warningFlow/getFlowList",
    method: "get",
    data: data
  });
};


// 响应命令单首页
export const getLndex = (data) => {
  return axios.request({
    url: "/emergency/emergencyCommand/index",
    method: "get",
    data: data
  });
};

// 响应命令单首页饼图(省公司数据)
export const getLndexPieApi = (data) => {
  return axios.request({
    url: "/emergency/responseHomePage/getStatistics",
    method: "get",
    data: data
  });
};
// 响应命令单  灾情信息弹窗
export const getDisasterList = (data) => {
  return axios.request({
    url: "/emergency/emergencyResponse/getResponseInfoListByEventIds",
    method: "get",
    data: data
  });
};

// 响应命令单  pdf下载
export const doDownPdf = (data) => {
  return axios.request({
    url: "/emergency/pdfResponseFile/doDownPdf",
    method: "get",
    data: data,
    headers: { "Content-Type": "application/x-www-form-urlencoded" },
    responseType: "blob"
  });
};
// 响应命令单反馈列表
export const doNewPageList = (data) => {
  return axios.request({
    url: "/docking/emergencyResponseConnectFeedBack/doNewPageList",
    method: "post",
    data: data
  });
};
// 响应命令单反馈详情
export const doGetById = (data) => {
  return axios.request({
    url: "/docking/emergencyResponseConnectFeedBack/doGetById",
    method: "get",
    data: data
  });
};
